package b.acct.test

import org.squbs.env.{DEV, Environment, EnvironmentResolver}
import org.squbs.httpclient.{DefaultHttpEndpointResolver, HttpEndpoint}

/**
  * Created by lenovo on 2016/12/31.
  */
class SampleEndpointResolver extends DefaultHttpEndpointResolver {
  override def name: String = "SampleEndpointResolver"
  override def resolve(svcName: String, env: Environment): Option[HttpEndpoint] = svcName match {
    case "sample" => Some(HttpEndpoint("http://v.juhe.cn:80"))
    case "juhe" => Some(HttpEndpoint("http://v.juhe.cn:80"))
    case _ => None
  }
}

object DummyDevEnvironmentResolver extends EnvironmentResolver {
  override def resolve: Environment = DEV
  override def name: String = "SampleDevEnvironmentResolver"
}